home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inventor Labs: Technology
/
INVENTORLABS_TECHNOLOGY.BIN
/
mac
/
FILES
/
EDISON.DIR
/
00629_Script_Edison Patent Object Script
< prev
next >
Wrap
Text File
|
1997-05-26
|
8KB
|
249 lines
--o Patent object
--instantiated as gPatentObj
property pZoomedIn, pDisplayingPatents
property pBackGSpriteNum, pDogEarSpriteNum, pDrawerSpriteNum, pPatentPictSpriteNum
property pLeftBarSpriteNum
property pPatentLocH, pPatentLocV
property pTextLineCounter, pCurrentTextDB, pTextFieldCastNameList
property pFirstCastNumList, pLastCastNumList
--BELL SPECIFIC PROPERTIES
property pBellFirstCast, pBellLastCast, pBellBackGrndBaseCastName, pBellTextFieldCastName
--WATT SPECIFIC PROPERTIES
property pWattFirstCast, pWattLastCast
--EDISON SPECIFIC PROPERTIES
property pEdisonFirstCast, pEdisonLastCast, pPageSnd
property pEdisonTextFieldCastName, pEdisonBackGrndBaseCastName
global gInventorIndexNum, gScoreEventObj, gUtilityObj
------------------------------------------------------------------<<ò>>
on mInit me
set pTextLineCounter = 0
set pFirstCastNumList = [0,0,0]
set pLastCastNumList = [0,0,0]
set pTextFieldCastNameList = [0,0,0]
--BELL
set pBellFirstCast = "BPATN1A.PIC"
set pBellLastCast = "BPATN12A.PIC"
set pBellBackGrndBaseCastName = "BDESK2.PIC"
set pBellTextFieldCastName = "Bell Patent Text"
--EDISON
set pEdisonFirstCast = "EPATNT1A.PIC"
set pEdisonLastCast = "EPATNT9A.PIC"
set pEdisonBackGrndBaseCastName = "ESAFEBG.PIC"
set pEdisonTextFieldCastName = "Edison Patent Text"
set pPatentLocH = 240
set pPatentLocV = 260
set pBackGSpriteNum = 2
set pPatentPictSpriteNum = 9
set pDogEarSpriteNum = 10
set pDrawerSpriteNum = 6
set pLeftBarSpriteNum = 21 --RightBarSpriteNum is this + 1
set pPageSnd = 1392
return me
end mInit
------------------------------------------------------------------<<ò>>
on mActivate me
--puppetSprite pBackGSpriteNum, true
puppetSprite pPatentPictSpriteNum, true
set pDisplayingPatents = false
set pZoomedIn = false
set pCurrentTextDB = "Edison Patent Text"
set TempPropList = [:]
addProp (TempPropList, value(pDrawerSpriteNum), #HS)
addprop( TempPropList, 21,#RETURN)
addprop( TempPropList, 22,#RETURN)
mSetCursors(gUtilityObj, TempPropList)
if gInventorIndexNum = 1 then
--EDISON
setAt(pFirstCastNumList, 1, (the number of cast pEdisonFirstCast))
setAt(pLastCastNumList, 1, (the number of cast pEdisonLastCast))
setAt(pTextFieldCastNameList, 1, (the number of cast pEdisonTextFieldCastName))
else if gInventorIndexNum = 2 then
--WATT
else if gInventorIndexNum = 3 then
--BELL
setAt(pFirstCastNumList, 3, (the number of cast pBellFirstCast))
setAt(pLastCastNumList, 3, (the number of cast pBellLastCast))
setAt(pTextFieldCastNameList, 3, (the number of cast pBellTextFieldCastName))
end if
mSetToolBtns (gInterfaceMgrObj, #PATENTS, me)
end mActivate
------------------------------------------------------------------<<ò>>
on mClose me
--puppetSprite pBackGSpriteNum, false
puppetSprite pPatentPictSpriteNum, false
mUnsetCursorList(gUtilityObj, [pPatentPictSpriteNum, pDogEarSpriteNum, pDrawerSpriteNum])
end mClose
------------------------------------------------------------------<<ò>>
on mPatentClickEvent me
set SpriteClicked = the clickOn
if SpriteClicked = pDogEarSpriteNum then
if pDisplayingPatents and (not pZoomedIn) then
mDogEarClick(me)
end if
else if (SpriteClicked = pDrawerSpriteNum) and (not pDisplayingPatents) then
mDisplayPatents(me)
else if (SpriteClicked = pLeftBarSpriteNum) or (Spriteclicked = pLeftBarSpriteNum + 1) then
if pZoomedIn then
mSwitchZoomLevel(me)
else if not pZoomedIn then
mInitiatePullOut (me)
end if
end if
end mPatentClickEvent
------------------------------------------------------------------<<ò>>
on mDisplayPatents me
set pTextLineCounter = 1
set pCurrentTextDB = getAt(pTextFieldCastNameList, gInventorIndexNum)
mUpdateText(me)
set tempPropList = [:]
addProp (tempPropList, value(pPatentPictSpriteNum), #ZoomIn)
addProp (tempPropList, value(pDogEarSpriteNum), #finger)
mUnsetCursorList(gUtilityObj, [pPatentPictSpriteNum, pDogEarSpriteNum, pDrawerSpriteNum])
mSetCursors(gUtilityObj, tempPropList)
set pDisplayingPatents = true
set the castNum of sprite pPatentPictSpriteNum = getAt(pFirstCastNumList, gInventorIndexNum)
set the locH of sprite pPatentPictSpriteNum = pPatentLocH
set the locV of sprite pPatentPictSpriteNum = pPatentLocV
--set the castNum of sprite pBackGSpriteNum = (the number of cast pBellBackGrndBaseCastName) + 1
updateStage
end mDisplayPatents
------------------------------------------------------------------<<ò>>
on mSwitchZoomLevel me
if pZoomedIn then
set the castNum of sprite pPatentPictSpriteNum = (the castNum of sprite pPatentPictSpriteNum) - 1
set the locV of sprite pPatentPictSpriteNum = pPatentLocV
set tempPropList = [:]
addProp (tempPropList, value(pPatentPictSpriteNum), #ZoomIn)
addProp (tempPropList, value(pDogEarSpriteNum), #finger)
mUnsetCursorList(gUtilityObj, [pPatentPictSpriteNum, pDogEarSpriteNum, pDrawerSpriteNum])
mSetCursors(gUtilityObj, tempPropList)
set pZoomedIn = FALSE
else if not pZoomedIn then
set the castNum of sprite pPatentPictSpriteNum = (the castNum of sprite pPatentPictSpriteNum) + 1
set tempPropList = [:]
addProp (tempPropList, value(pPatentPictSpriteNum), #Operate)
mUnsetCursorList(gUtilityObj, [pPatentPictSpriteNum, pDogEarSpriteNum, pDrawerSpriteNum])
mSetCursors(gUtilityObj, tempPropList)
set pZoomedIn = TRUE
end if
updateStage
end mSwitchZoomLevel
------------------------------------------------------------------<<ò>>
on mDogEarClick me
sound stop 2
puppetsound 2, pPageSnd
if the castNum of sprite pPatentPictSpriteNum = getAt(pLastCastNumList, gInventorIndexNum) then
set the castNum of sprite pPatentPictSpriteNum = getAt(pFirstCastNumList, gInventorIndexNum)
set pTextLineCounter = 1
else
set the castNum of sprite pPatentPictSpriteNum = (the castNum of sprite pPatentPictSpriteNum) + 2
set pTextLineCounter = pTextLineCounter + 6
end if
mUpdateText(me)
updateStage
end mDogEarClick
------------------------------------------------------------------<<ò>>
on mInitiatePullOut me
mClose(me)
go "Patents PO"
mPullOut(gScoreEventObj)
end mInitiatePullOut
------------------------------------------------------------------<<ò>>
on mDragBlownUpPatent me
set InitialMouseV = the mouseV
set InitialPatentLocV = the locV of sprite pPatentPictSpriteNum
repeat while the mouseDown
set mouseDelta = the mouseV - InitialMouseV
set NewPatentLocV = InitialPatentLocV + mouseDelta
if NewPatentLocV > 438 then set NewPatentLocV = 438
if NewPatentLocV < 82 then set NewPatentLocV = 82
set the locV of sprite pPatentPictSpriteNum = NewPatentLocV
updateStage
end repeat
end mDragBlownUpPatent
------------------------------------------------------------------<<ò>>
on mUpdateText me
set labelString = line pTextLineCounter to (pTextLineCounter + 2) of field pCurrentTextDB
set BodyString = line (pTextLineCounter + 3) to (pTextLineCounter + 5) of field pCurrentTextDB
mDisplaySecondaryText(gUtilityObj, LabelString, BodyString)
end mUpdateText
------------------------------------------------------------------<<ò>>
on mPatentDownClick me
if pDisplayingPatents and pZoomedIn then
mDragBlownUpPatent(me)
dontPassEvent
end if
end mPatentDownClick
------------------------------------------------------------------<<ò>>
on mPatentUpClick me
if pDisplayingPatents and (not pZoomedIn) then
mSwitchZoomLevel(me)
end if
end mPatentUpClick
------------------------------------------------------------------<<ò>>
on mZoom me, whatselection
if (whatselection = 1) and ( pZoomedIn) then
mSwitchZoomLevel me
else if (whatselection = 2) and not pZoomedIn then
mSwitchZoomLevel me
end if
end mZoom
------------------------------------------------------------------<<ò>>